<!--********************************************************************
* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>地图常用方法</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        .btns {
            position: absolute;
            left: 10px;
            top: 10px;
            z-index: 10;
        }
    </style>
</head>

<body>
    <iframe id="mapFrame" src="" frameborder="0" style="width: 100vw;height: 100vh;"></iframe>
    <div class="btns">
       <button onclick="mapApp.gotoSomeplaceByGridname('澄江街道')">切换镇级</button>
       <button onclick="mapApp.gotoSomeplaceByGridid('320281001024005')">根据id到具体网格</button>
    </div>
</body>
<script type="text/javascript">
    // 初始化配置 和 样式配置
    // 可以注销 和 打开相关配置，查看变化效果
    document.getElementById('mapFrame').src = '../../map/index.html';
    window.$Config = {
        mapConfig: {
            useMask: '0',
            prismClick: 'dblclick'
        }
    }


    var mapWindow,lwmap,mapApp;
    window.mapLoaded = function (w, m, a) {
      mapWindow = w;
      lwmap = m;
      mapApp = a;
    };

    window.handleGridSingleClick = function (p) {
        console.log(p);
    }
</script>

</html>